/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.base.files;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import model.Prover;
import view.base.TreeCollapsePanel;

/**
 *
 * @author camil
 */
public class SaveTreeTxtPanel extends view.base.files.ChooseFilePanel {

    Prover prover = null;

    public SaveTreeTxtPanel(TreeCollapsePanel tcp) {
        super();
        prover = tcp.p;
        setButtonName("Save");
    }

    /**
     * load formula from file
     */
    @Override
    public void action() {
        String text = prover.printTree();
        ChooseFilePanel.write(text, file);
    }
}
